package org.example;

import clojure.lang.Obj;
import org.junit.Test;
import org.my.stock.h2.MaiDian;
import org.my.stock.h2.MaiDian1;

import java.util.ArrayList;
import java.util.List;

public class MaiDian_case {

    @Test
    public void getlst() {
        String content = "jQuery351058620222703612_1749034047746({\"rc\":0,\"rt\":17,\"svr\":175642633,\"lt\":1,\"full\":0,\"dlmkts\":\"\",\"data\":{\"code\":\"688702\",\"market\":1,\"name\":\"盛科通信-U\",\"decimal\":2,\"dktotal\":412,\"preKPrice\":69.37,\"klines\":[\"2024-12-03,70.38,69.97,71.21,68.60,18752,131219157.00,3.76,0.86,0.60,0.93\",\"2024-12-04,75.52,71.36,80.12,71.27,37329,279252132.00,12.65,1.99,1.39,1.85\",\"2024-12-05,71.00,71.80,74.65,71.00,20122,145577420.00,5.11,0.62,0.44,1.00\",\"2024-12-06,71.50,72.48,74.98,71.38,25292,185053035.00,5.01,0.95,0.68,1.26\",\"2024-12-09,72.13,72.02,73.33,70.36,18069,129552133.00,4.10,-0.63,-0.46,0.90\",\"2024-12-10,75.93,73.76,77.90,73.03,27754,208287275.00,6.76,2.42,1.74,1.38\",\"2024-12-11,72.42,73.65,74.00,71.12,23420,170645737.00,3.90,-0.15,-0.11,1.16\",\"2024-12-12,73.44,72.62,74.20,71.80,30682,223513243.00,3.26,-1.40,-1.03,1.52\",\"2024-12-13,72.55,72.38,76.90,72.38,65607,492363549.00,6.22,-0.33,-0.24,3.26\",\"2024-12-16,78.98,78.35,81.66,74.00,66221,516181167.00,10.58,8.25,5.97,3.29\",\"2024-12-17,76.41,75.11,82.66,74.73,38247,299629899.00,10.12,-4.14,-3.24,1.90\",\"2024-12-18,73.51,81.45,83.32,72.62,40975,324103926.00,14.25,8.44,6.34,2.03\",\"2024-12-19,79.00,90.00,97.68,79.00,50790,438543072.00,22.93,10.50,8.55,2.52\",\"2024-12-20,87.58,93.53,97.33,87.20,37968,350266825.00,11.26,3.92,3.53,1.88\",\"2024-12-23,87.45,88.00,89.30,81.81,60338,513539596.00,8.01,-5.91,-5.53,2.99\",\"2024-12-24,86.90,86.17,87.79,83.07,37319,318849754.00,5.36,-2.08,-1.83,1.85\",\"2024-12-25,86.30,90.58,92.17,85.12,28594,254301409.00,8.18,5.12,4.41,1.42\",\"2024-12-26,88.85,95.49,96.90,88.23,31181,291476045.00,9.57,5.42,4.91,1.55\",\"2024-12-27,94.80,89.00,95.01,88.37,29820,271239816.00,6.95,-6.80,-6.49,1.48\",\"2024-12-30,88.90,87.66,89.50,86.31,21164,186381864.00,3.58,-1.51,-1.34,1.05\",\"2024-12-31,87.37,84.00,88.50,83.53,26197,223148642.00,5.67,-4.18,-3.66,1.30\",\"2025-01-02,84.00,78.76,84.00,77.75,26336,210987963.00,7.44,-6.24,-5.24,1.31\",\"2025-01-03,77.63,75.49,79.54,74.74,25567,194971107.00,6.09,-4.15,-3.27,1.27\",\"2025-01-06,74.70,71.77,77.22,71.16,27476,201625218.00,8.03,-4.93,-3.72,1.36\",\"2025-01-07,72.01,77.86,78.66,71.05,30200,227866447.00,10.60,8.49,6.09,1.50\",\"2025-01-08,76.70,77.99,79.48,75.69,26887,208145264.00,4.87,0.17,0.13,1.33\",\"2025-01-09,77.00,78.00,80.80,77.00,23969,189448902.00,4.87,0.01,0.01,1.19\",\"2025-01-10,78.00,78.97,85.00,77.05,30225,247406140.00,10.19,1.24,0.97,1.50\",\"2025-01-13,76.89,79.79,80.40,76.00,19867,156038791.00,5.57,1.04,0.82,0.99\",\"2025-01-14,80.43,83.83,84.98,78.57,30470,249146033.00,8.03,5.06,4.04,1.51\",\"2025-01-15,83.48,80.39,84.21,80.10,26836,220639778.00,4.90,-4.10,-3.44,1.33\",\"2025-01-16,80.50,77.59,81.40,75.81,38781,301928373.00,6.95,-3.48,-2.80,1.92\",\"2025-01-17,77.50,84.29,84.80,76.47,42874,348144444.00,10.74,8.64,6.70,2.13\",\"2025-01-20,85.00,83.93,85.00,80.31,23355,193802050.00,5.56,-0.43,-0.36,1.16\",\"2025-01-21,84.30,89.59,91.66,83.00,30282,267485411.00,10.32,6.74,5.66,1.50\",\"2025-01-22,89.59,92.69,95.56,88.50,24989,232133020.00,7.88,3.46,3.10,1.24\",\"2025-01-23,93.52,90.40,96.52,90.09,22180,206032106.00,6.94,-2.47,-2.29,1.10\",\"2025-01-24,89.71,86.04,92.43,85.30,37277,328047839.00,7.89,-4.82,-4.36,1.85\",\"2025-01-27,87.56,82.60,87.56,82.52,18336,153828835.00,5.86,-4.00,-3.44,0.91\",\"2025-02-05,83.90,83.64,86.18,81.55,23587,199114381.00,5.61,1.26,1.04,1.17\",\"2025-02-06,83.64,85.60,86.86,82.36,32204,273967001.00,5.38,2.34,1.96,1.60\",\"2025-02-07,85.96,83.10,86.67,81.50,40651,340750037.00,6.04,-2.92,-2.50,2.02\",\"2025-02-10,83.10,82.92,86.65,80.11,37851,314053767.00,7.87,-0.22,-0.18,1.88\",\"2025-02-11,83.00,81.54,83.05,80.30,27746,225965989.00,3.32,-1.66,-1.38,1.38\",\"2025-02-12,81.52,82.16,83.23,80.67,19768,162284360.00,3.14,0.76,0.62,0.98\",\"2025-02-13,82.60,77.32,82.78,77.29,31181,246725897.00,6.68,-5.89,-4.84,1.55\",\"2025-02-14,76.65,74.42,77.97,73.25,42229,315244736.00,6.10,-3.75,-2.90,2.10\",\"2025-02-17,75.22,76.98,78.38,74.42,38432,292754021.00,5.32,3.44,2.56,1.91\",\"2025-02-18,77.01,72.36,77.24,72.00,31846,236115712.00,6.81,-6.00,-4.62,1.58\",\"2025-02-19,73.00,72.99,74.40,71.11,36187,263878832.00,4.55,0.87,0.63,1.80\",\"2025-02-20,72.99,72.75,74.20,71.79,29001,210551484.00,3.30,-0.33,-0.24,1.44\",\"2025-02-21,75.00,78.76,80.89,72.90,69895,541963766.00,10.98,8.26,6.01,3.47\",\"2025-02-24,78.50,76.20,79.48,75.00,38393,295331494.00,5.69,-3.25,-2.56,1.91\",\"2025-02-25,74.80,78.87,80.50,73.98,39352,306294154.00,8.56,3.50,2.67,1.95\",\"2025-02-26,78.55,78.80,80.50,77.01,31971,252162571.00,4.43,-0.09,-0.07,1.59\",\"2025-02-27,78.08,79.20,82.42,77.50,37498,300006348.00,6.24,0.51,0.40,1.86\",\"2025-02-28,78.18,71.29,78.79,70.50,41205,303904844.00,10.47,-9.99,-7.91,2.04\",\"2025-03-03,71.30,73.53,74.74,69.18,40341,293893655.00,7.80,3.14,2.24,2.00\",\"2025-03-04,72.68,73.88,75.40,72.06,27745,204774523.00,4.54,0.48,0.35,1.38\",\"2025-03-05,73.92,72.57,74.11,71.59,24018,174369093.00,3.41,-1.77,-1.31,1.19\",\"2025-03-06,72.50,76.21,77.77,72.38,34565,261839669.00,7.43,5.02,3.64,1.72\",\"2025-03-07,75.90,74.56,77.50,73.80,23116,174339047.00,4.86,-2.17,-1.65,1.15\",\"2025-03-10,74.10,73.58,74.55,72.03,19206,140466120.00,3.38,-1.31,-0.98,0.95\",\"2025-03-11,72.19,71.40,73.52,70.40,27213,194083462.00,4.24,-2.96,-2.18,1.35\",\"2025-03-12,71.57,70.75,73.60,69.80,28133,201160763.00,5.32,-0.91,-0.65,1.40\",\"2025-03-13,70.75,68.55,70.76,67.77,23480,161845862.00,4.23,-3.11,-2.20,1.17\",\"2025-03-14,68.37,69.55,70.38,68.00,20430,141362900.00,3.47,1.46,1.00,1.01\",\"2025-03-17,70.00,68.67,70.20,67.88,18848,129141108.00,3.34,-1.27,-0.88,0.94\",\"2025-03-18,67.97,68.68,70.18,67.97,15458,106374926.00,3.22,0.01,0.01,0.77\",\"2025-03-19,68.08,66.76,68.93,66.18,19345,129860999.00,4.00,-2.80,-1.92,0.96\",\"2025-03-20,66.47,66.28,67.49,65.74,14788,98407091.00,2.62,-0.72,-0.48,0.73\",\"2025-03-21,65.90,63.88,66.46,63.80,29297,189947495.00,4.01,-3.62,-2.40,1.45\",\"2025-03-24,64.00,64.62,66.47,63.72,20611,133594792.00,4.30,1.16,0.74,1.02\",\"2025-03-25,65.01,64.16,66.58,63.97,19254,124881135.00,4.04,-0.71,-0.46,0.96\",\"2025-03-26,64.20,64.45,65.34,63.90,10452,67473419.00,2.24,0.45,0.29,0.52\",\"2025-03-27,64.00,64.03,65.33,62.96,17740,113607159.00,3.68,-0.65,-0.42,0.88\",\"2025-03-28,64.10,62.80,64.65,62.50,11880,75240056.00,3.36,-1.92,-1.23,0.59\",\"2025-03-31,61.82,64.67,65.78,61.70,25309,163060156.00,6.50,2.98,1.87,1.26\",\"2025-04-01,64.48,64.22,66.15,63.91,19597,127717411.00,3.46,-0.70,-0.45,0.97\",\"2025-04-02,64.12,63.80,65.38,63.20,13603,87163036.00,3.39,-0.65,-0.42,0.68\",\"2025-04-03,63.32,63.33,65.19,62.96,11501,73348715.00,3.50,-0.74,-0.47,0.57\",\"2025-04-07,57.99,56.46,61.50,54.50,31702,184840740.00,11.05,-10.85,-6.87,1.57\",\"2025-04-08,58.78,59.80,60.19,57.00,34595,204777282.00,5.65,5.92,3.34,1.72\",\"2025-04-09,59.10,62.76,64.99,58.66,34991,218431886.00,10.59,4.95,2.96,1.74\",\"2025-04-10,64.39,63.58,64.85,62.75,21165,135216023.00,3.35,1.31,0.82,1.05\",\"2025-04-11,64.40,69.06,71.90,63.48,48679,333062903.00,13.24,8.62,5.48,2.42\",\"2025-04-14,69.09,69.41,71.33,67.74,37395,261601825.00,5.20,0.51,0.35,1.86\",\"2025-04-15,68.93,67.90,69.86,66.62,28442,191776576.00,4.67,-2.18,-1.51,1.41\",\"2025-04-16,67.98,68.19,69.45,67.90,19609,134265717.00,2.28,0.43,0.29,0.97\",\"2025-04-17,67.77,69.66,70.09,67.77,27030,187870012.00,3.40,2.16,1.47,1.34\",\"2025-04-18,69.60,65.61,69.60,65.01,22693,151016110.00,6.59,-5.81,-4.05,1.13\",\"2025-04-21,65.00,64.68,66.66,64.43,20239,132114191.00,3.40,-1.42,-0.93,1.00\",\"2025-04-22,64.60,64.25,65.48,63.00,13809,88906395.00,3.83,-0.66,-0.43,0.69\",\"2025-04-23,65.16,65.10,65.77,63.85,15639,101275843.00,2.99,1.32,0.85,0.78\",\"2025-04-24,65.06,62.94,65.10,62.30,15397,97268285.00,4.30,-3.32,-2.16,0.76\",\"2025-04-25,62.75,62.90,63.80,62.11,13195,82989097.00,2.69,-0.06,-0.04,0.65\",\"2025-04-28,61.64,62.86,64.11,60.69,15087,94021113.00,5.44,-0.06,-0.04,0.75\",\"2025-04-29,62.80,63.66,63.95,62.13,9263,58629860.00,2.90,1.27,0.80,0.46\",\"2025-04-30,63.66,66.69,67.61,63.16,24031,158511746.00,6.99,4.76,3.03,1.19\",\"2025-05-06,66.94,66.60,67.73,65.50,17090,113721553.00,3.34,-0.13,-0.09,0.85\",\"2025-05-07,66.99,64.35,68.58,63.83,17315,113335751.00,7.13,-3.38,-2.25,0.86\",\"2025-05-08,64.36,64.88,66.12,63.87,13674,89154758.00,3.50,0.82,0.53,0.68\",\"2025-05-09,64.86,62.15,64.96,61.89,17202,107897906.00,4.73,-4.21,-2.73,0.85\",\"2025-05-12,62.88,61.83,63.50,60.38,18950,116336298.00,5.02,-0.51,-0.32,0.94\",\"2025-05-13,62.67,60.99,63.00,60.85,13416,82616042.00,3.48,-1.36,-0.84,0.67\",\"2025-05-14,61.16,60.69,61.66,60.06,14693,89162663.00,2.62,-0.49,-0.30,0.73\",\"2025-05-15,60.81,59.09,60.81,59.09,10010,59573081.00,2.83,-2.64,-1.60,0.50\",\"2025-05-16,59.99,59.89,60.22,58.22,16350,96545092.00,3.38,1.35,0.80,0.81\",\"2025-05-19,61.47,60.08,61.64,59.28,12519,75257123.00,3.94,0.32,0.19,0.62\",\"2025-05-20,60.37,59.99,60.70,58.90,11738,70447253.00,3.00,-0.15,-0.09,0.58\",\"2025-05-21,60.14,58.50,60.20,58.04,15133,89437867.00,3.60,-2.48,-1.49,0.75\",\"2025-05-22,58.25,57.96,59.25,57.88,11907,69648609.00,2.34,-0.92,-0.54,0.59\",\"2025-05-23,57.99,58.03,58.59,57.00,13681,79224857.00,2.74,0.12,0.07,0.68\",\"2025-05-26,58.78,58.13,59.28,56.68,11538,67424553.00,4.48,0.17,0.10,0.57\",\"2025-05-27,58.13,57.99,58.99,57.23,10517,61011279.00,3.03,-0.24,-0.14,0.52\",\"2025-05-28,57.99,57.70,58.86,57.23,9001,52059008.00,2.81,-0.50,-0.29,0.45\",\"2025-05-29,57.69,59.20,59.20,57.10,10756,62881253.00,3.64,2.60,1.50,0.53\",\"2025-05-30,58.98,59.45,59.50,57.80,9224,54145109.00,2.87,0.42,0.25,0.46\",\"2025-06-03,59.45,61.58,62.65,58.50,25553,158151412.00,6.98,3.58,2.13,1.27\",\"2025-06-04,62.21,63.52,63.84,61.58,21327,134540296.00,3.67,3.15,1.94,1.06\"]}});";
        List<String> lst = MaiDian.getList(content);
        List<Object> rs = new ArrayList<>();
        for (String line : lst) {
            List<Object> ls = new ArrayList<>();
            String[] ss = line.split(",");
            for (int i = 0; i < ss.length; i++) {
                if (i == 0) {
                    ls.add(ss[i]);
                } else {
                    ls.add(Float.valueOf(ss[i]));
                }
            }
            rs.add(ls);
        }
        System.out.println(rs);
    }

    @Test
    public void getlst_1() {
        String content = "jQuery112308788068735906851_1744518781844({\"rc\":0,\"rt\":22,\"svr\":175642664,\"lt\":1,\"full\":0,\"dlmkts\":\"\",\"data\":{\"code\":\"000557\",\"market\":0,\"name\":\"西部创业\",\"klines\":[\"2024-12-26,-12753995.0,7195394.0,5558601.0,-9715837.0,-3038158.0,-21.76,12.28,9.49,-16.58,-5.18,5.43,-0.18,0.00,0.00\",\"2024-12-27,-10012926.0,6533679.0,3479246.0,-7050522.0,-2962404.0,-16.67,10.88,5.79,-11.74,-4.93,5.47,0.74,0.00,0.00\",\"2024-12-30,-10066380.0,2375135.0,7691245.0,-2332246.0,-7734134.0,-10.27,2.42,7.85,-2.38,-7.89,5.32,-2.74,0.00,0.00\",\"2024-12-31,-11891751.0,14614667.0,-2722916.0,-6867380.0,-5024371.0,-15.53,19.08,-3.56,-8.97,-6.56,5.19,-2.44,0.00,0.00\",\"2025-01-02,-5939919.0,6909244.0,-969325.0,-2627177.0,-3312742.0,-6.70,7.79,-1.09,-2.96,-3.74,5.09,-1.93,0.00,0.00\",\"2025-01-03,3214171.0,3242328.0,-6456499.0,-4845454.0,8059625.0,3.69,3.72,-7.40,-5.56,9.24,4.96,-2.55,0.00,0.00\",\"2025-01-06,2295797.0,-4837981.0,2542184.0,5816771.0,-3520974.0,3.74,-7.88,4.14,9.48,-5.74,4.94,-0.40,0.00,0.00\",\"2025-01-07,-7249206.0,504694.0,6744511.0,-2022387.0,-5226819.0,-14.02,0.98,13.04,-3.91,-10.11,5.01,1.42,0.00,0.00\",\"2025-01-08,-2511753.0,-8681153.0,11192907.0,-727009.0,-1784744.0,-2.46,-8.51,10.97,-0.71,-1.75,5.04,0.60,0.00,0.00\",\"2025-01-09,-4597215.0,-1513879.0,6111094.0,406573.0,-5003788.0,-8.44,-2.78,11.22,0.75,-9.19,5.00,-0.79,0.00,0.00\",\"2025-01-10,10899813.0,-7662688.0,-3237125.0,4591960.0,6307853.0,17.04,-11.98,-5.06,7.18,9.86,4.93,-1.40,0.00,0.00\",\"2025-01-13,-89845.0,-44482.0,134327.0,472043.0,-561888.0,-0.23,-0.11,0.34,1.20,-1.43,4.94,0.20,0.00,0.00\",\"2025-01-14,-9220567.0,8563894.0,656673.0,-2121630.0,-7098937.0,-12.81,11.90,0.91,-2.95,-9.86,5.07,2.63,0.00,0.00\",\"2025-01-15,640542.0,-908823.0,268282.0,569592.0,70950.0,1.12,-1.59,0.47,0.99,0.12,5.10,0.59,0.00,0.00\",\"2025-01-16,-5594457.0,5887569.0,-293111.0,-3282888.0,-2311569.0,-5.88,6.19,-0.31,-3.45,-2.43,5.04,-1.18,0.00,0.00\",\"2025-01-17,-5629819.0,6737779.0,-1107960.0,-5629819.0,0.0,-10.89,13.03,-2.14,-10.89,0.00,5.07,0.60,0.00,0.00\",\"2025-01-20,-2212408.0,3634164.0,-1421756.0,-3227308.0,1014900.0,-5.10,8.37,-3.27,-7.43,2.34,5.09,0.39,0.00,0.00\",\"2025-01-21,365874.0,1574613.0,-1940487.0,320410.0,45464.0,0.87,3.76,-4.64,0.77,0.11,5.04,-0.98,0.00,0.00\",\"2025-01-22,5813902.0,-1760610.0,-4053292.0,4836785.0,977117.0,15.47,-4.69,-10.79,12.87,2.60,5.02,-0.40,0.00,0.00\",\"2025-01-23,-3516905.0,5628070.0,-2111165.0,-2192120.0,-1324785.0,-5.11,8.18,-3.07,-3.19,-1.93,5.05,0.60,0.00,0.00\",\"2025-01-24,-1489083.0,1563021.0,-73938.0,404209.0,-1893292.0,-2.80,2.94,-0.14,0.76,-3.56,5.04,-0.20,0.00,0.00\",\"2025-01-27,-1571283.0,433610.0,1137673.0,-2033289.0,462006.0,-2.67,0.74,1.93,-3.46,0.79,5.09,0.99,0.00,0.00\",\"2025-02-05,4136305.0,-4945110.0,808806.0,4273774.0,-137469.0,5.60,-6.69,1.09,5.78,-0.19,5.10,0.20,0.00,0.00\",\"2025-02-06,-325018.0,1647290.0,-1322272.0,-1400207.0,1075189.0,-0.48,2.45,-1.97,-2.08,1.60,5.18,1.57,0.00,0.00\",\"2025-02-07,2134033.0,1883962.0,-4017995.0,38614.0,2095419.0,2.13,1.88,-4.01,0.04,2.09,5.28,1.93,0.00,0.00\",\"2025-02-10,2065534.0,-9651967.0,7586434.0,3428983.0,-1363449.0,2.78,-13.00,10.22,4.62,-1.84,5.27,-0.19,0.00,0.00\",\"2025-02-11,-3427336.0,4649115.0,-1221779.0,-1466444.0,-1960892.0,-6.09,8.26,-2.17,-2.61,-3.48,5.23,-0.76,0.00,0.00\",\"2025-02-12,-1356281.0,671424.0,684856.0,-2313201.0,956920.0,-2.87,1.42,1.45,-4.90,2.03,5.24,0.19,0.00,0.00\",\"2025-02-13,-4755543.0,2026127.0,2729416.0,-5167332.0,411789.0,-10.33,4.40,5.93,-11.22,0.89,5.20,-0.76,0.00,0.00\",\"2025-02-14,-1579896.0,413361.0,1166535.0,-382584.0,-1197312.0,-2.95,0.77,2.18,-0.71,-2.24,5.19,-0.19,0.00,0.00\",\"2025-02-17,9611973.0,-10145612.0,533639.0,5983804.0,3628169.0,8.12,-8.57,0.45,5.06,3.07,5.31,2.31,0.00,0.00\",\"2025-02-18,4673081.0,-287873.0,-4385208.0,4434207.0,238874.0,6.73,-0.41,-6.31,6.38,0.34,5.19,-2.26,0.00,0.00\",\"2025-02-19,-9001836.0,5792586.0,3209250.0,-1572578.0,-7429258.0,-14.43,9.28,5.14,-2.52,-11.91,5.17,-0.39,0.00,0.00\",\"2025-02-20,-7692327.0,924197.0,6768130.0,-4813918.0,-2878409.0,-13.61,1.63,11.97,-8.51,-5.09,5.10,-1.35,0.00,0.00\",\"2025-02-21,-3161306.0,3827801.0,-666496.0,-2143306.0,-1018000.0,-6.21,7.52,-1.31,-4.21,-2.00,5.10,0.00,0.00,0.00\",\"2025-02-24,-1139302.0,-4083623.0,5222926.0,-1123264.0,-16038.0,-2.09,-7.48,9.57,-2.06,-0.03,5.11,0.20,0.00,0.00\",\"2025-02-25,-1902008.0,-34372.0,1936381.0,-7022255.0,5120247.0,-3.21,-0.06,3.26,-11.84,8.63,5.01,-1.96,0.00,0.00\",\"2025-02-26,-2330491.0,3244478.0,-913988.0,-2198663.0,-131828.0,-4.12,5.73,-1.61,-3.88,-0.23,5.08,1.40,0.00,0.00\",\"2025-02-27,-6979884.0,6996035.0,-16151.0,-5956773.0,-1023111.0,-11.38,11.41,-0.03,-9.71,-1.67,5.08,0.00,0.00,0.00\",\"2025-02-28,3193807.0,-2108369.0,-1085438.0,1982413.0,1211394.0,4.53,-2.99,-1.54,2.81,1.72,5.00,-1.57,0.00,0.00\",\"2025-03-03,-2806870.0,-332190.0,3139061.0,3724296.0,-6531166.0,-5.25,-0.62,5.87,6.97,-12.22,5.00,0.00,0.00,0.00\",\"2025-03-04,-1902764.0,988607.0,914157.0,-1202665.0,-700099.0,-4.48,2.33,2.15,-2.83,-1.65,5.05,1.00,0.00,0.00\",\"2025-03-05,8017810.0,-6689478.0,-1328332.0,6599061.0,1418749.0,19.75,-16.48,-3.27,16.26,3.50,5.03,-0.40,0.00,0.00\",\"2025-03-06,-3838225.0,1819617.0,2018608.0,-1416639.0,-2421586.0,-6.89,3.27,3.63,-2.54,-4.35,5.07,0.80,0.00,0.00\",\"2025-03-07,19086711.0,-15799168.0,-3287543.0,10792561.0,8294150.0,7.08,-5.86,-1.22,4.00,3.08,5.29,4.34,0.00,0.00\",\"2025-03-10,1755720.0,-14483928.0,12728208.0,4396337.0,-2640617.0,1.18,-9.74,8.56,2.96,-1.78,5.35,1.13,0.00,0.00\",\"2025-03-11,15855110.0,-12528960.0,-3326149.0,-235660.0,16090770.0,9.78,-7.73,-2.05,-0.15,9.93,5.51,2.99,0.00,0.00\",\"2025-03-12,12738592.0,-10098332.0,-2640261.0,2933927.0,9804665.0,9.09,-7.21,-1.88,2.09,7.00,5.58,1.27,0.00,0.00\",\"2025-03-13,-5165163.0,2525665.0,2639499.0,-1990146.0,-3175017.0,-5.47,2.67,2.79,-2.11,-3.36,5.50,-1.43,0.00,0.00\",\"2025-03-14,1552007.0,3189703.0,-4741710.0,-3350810.0,4902817.0,1.85,3.80,-5.66,-4.00,5.85,5.48,-0.36,0.00,0.00\",\"2025-03-17,-1585342.0,1608425.0,-23084.0,289241.0,-1874583.0,-2.85,2.89,-0.04,0.52,-3.37,5.47,-0.18,0.00,0.00\",\"2025-03-18,267214.0,2227438.0,-2494653.0,-2147468.0,2414682.0,0.52,4.35,-4.87,-4.19,4.71,5.46,-0.18,0.00,0.00\",\"2025-03-19,1856401.0,-4153047.0,2296647.0,1882709.0,-26308.0,3.24,-7.25,4.01,3.29,-0.05,5.52,1.10,0.00,0.00\",\"2025-03-20,588715.0,-3262331.0,2673617.0,-413779.0,1002494.0,0.82,-4.54,3.72,-0.58,1.39,5.53,0.18,0.00,0.00\",\"2025-03-21,21621884.0,-18428614.0,-3193270.0,1234410.0,20387474.0,19.03,-16.22,-2.81,1.09,17.95,5.59,1.08,0.00,0.00\",\"2025-03-24,1426684.0,-12879899.0,11453215.0,11228070.0,-9801386.0,1.02,-9.25,8.23,8.07,-7.04,5.50,-1.61,0.00,0.00\",\"2025-03-25,-8945930.0,5718045.0,3227885.0,-7585602.0,-1360328.0,-14.64,9.36,5.28,-12.41,-2.23,5.47,-0.55,0.00,0.00\",\"2025-03-26,1711275.0,2826732.0,-4538008.0,-8041396.0,9752671.0,1.99,3.29,-5.28,-9.35,11.34,5.59,2.19,0.00,0.00\",\"2025-03-27,1085843.0,1066191.0,-2152033.0,-2223983.0,3309826.0,2.05,2.02,-4.07,-4.20,6.26,5.59,0.00,0.00,0.00\",\"2025-03-28,784086.0,1866043.0,-2650130.0,-4816815.0,5600901.0,0.91,2.17,-3.08,-5.60,6.52,5.51,-1.43,0.00,0.00\",\"2025-03-31,-2226952.0,3587433.0,-1360480.0,-2226264.0,-688.0,-4.46,7.19,-2.73,-4.46,-0.00,5.41,-1.81,0.00,0.00\",\"2025-04-01,-3266111.0,3354973.0,-88862.0,-1929950.0,-1336161.0,-7.77,7.98,-0.21,-4.59,-3.18,5.47,1.11,0.00,0.00\",\"2025-04-02,-1387543.0,-525253.0,1912796.0,-2768618.0,1381075.0,-2.47,-0.94,3.41,-4.94,2.46,5.56,1.65,0.00,0.00\",\"2025-04-03,-5556837.0,1756702.0,3800136.0,-2313485.0,-3243352.0,-8.19,2.59,5.60,-3.41,-4.78,5.55,-0.18,0.00,0.00\",\"2025-04-07,-10906424.0,5661311.0,5245112.0,-11139729.0,233305.0,-9.72,5.05,4.68,-9.93,0.21,5.00,-9.91,0.00,0.00\",\"2025-04-08,3210039.0,3023641.0,-6233681.0,4945242.0,-1735203.0,2.55,2.40,-4.95,3.93,-1.38,5.13,2.60,0.00,0.00\",\"2025-04-09,-4597266.0,4495360.0,101906.0,-2960759.0,-1636507.0,-2.96,2.90,0.07,-1.91,-1.05,5.48,6.82,0.00,0.00\",\"2025-04-10,-2177273.0,4313390.0,-2136118.0,-6145578.0,3968305.0,-1.52,3.02,-1.49,-4.30,2.78,5.53,0.91,0.00,0.00\",\"2025-04-11,-15572280.0,11894939.0,3677342.0,-11622758.0,-3949522.0,-16.57,12.66,3.91,-12.37,-4.20,5.43,-1.81,0.00,0.00\",\"2025-04-14,37418.0,-7358967.0,7321550.0,37418.0,0.0,0.04,-8.55,8.51,0.04,0.00,5.50,1.29,0.00,0.00\",\"2025-04-15,-4193561.0,784534.0,3409028.0,-7854841.0,3661280.0,-6.61,1.24,5.37,-12.38,5.77,5.38,-2.18,0.00,0.00\",\"2025-04-16,-4308802.0,6443569.0,-2134767.0,-2429606.0,-1879196.0,-7.40,11.06,-3.67,-4.17,-3.23,5.32,-1.12,0.00,0.00\",\"2025-04-17,654917.0,559155.0,-1214072.0,696179.0,-41262.0,1.94,1.66,-3.60,2.06,-0.12,5.28,-0.75,0.00,0.00\",\"2025-04-18,-1422540.0,2252690.0,-830150.0,-1432742.0,10202.0,-3.48,5.51,-2.03,-3.50,0.02,5.23,-0.95,0.00,0.00\",\"2025-04-21,-3245308.0,4362820.0,-1117513.0,-1151421.0,-2093887.0,-9.42,12.67,-3.24,-3.34,-6.08,5.23,0.00,0.00,0.00\",\"2025-04-22,13156852.0,-9512190.0,-3644661.0,12055616.0,1101236.0,13.39,-9.68,-3.71,12.27,1.12,5.41,3.44,0.00,0.00\",\"2025-04-23,-3601841.0,2413953.0,1187889.0,-869841.0,-2732000.0,-4.42,2.96,1.46,-1.07,-3.35,5.40,-0.18,0.00,0.00\",\"2025-04-24,2840499.0,597317.0,-3437816.0,1750229.0,1090270.0,4.78,1.00,-5.78,2.94,1.83,5.42,0.37,0.00,0.00\",\"2025-04-25,-2854277.0,2364332.0,489945.0,-1260048.0,-1594229.0,-4.93,4.08,0.85,-2.18,-2.75,5.40,-0.37,0.00,0.00\",\"2025-04-28,-2676271.0,-550028.0,3226299.0,-2127687.0,-548584.0,-4.11,-0.84,4.95,-3.26,-0.84,5.20,-3.70,0.00,0.00\",\"2025-04-29,6152237.0,-1856656.0,-4295581.0,63426.0,6088811.0,15.81,-4.77,-11.04,0.16,15.65,5.25,0.96,0.00,0.00\",\"2025-04-30,-815747.0,-2670976.0,3486724.0,808411.0,-1624158.0,-1.59,-5.20,6.79,1.57,-3.16,5.17,-1.52,0.00,0.00\",\"2025-05-06,1890252.0,4471210.0,-6361462.0,1876650.0,13602.0,2.17,5.14,-7.31,2.16,0.02,5.38,4.06,0.00,0.00\",\"2025-05-07,-5357810.0,5180769.0,177041.0,-1940508.0,-3417302.0,-10.29,9.95,0.34,-3.73,-6.56,5.43,0.93,0.00,0.00\",\"2025-05-08,-887779.0,-2163198.0,3050977.0,-5138047.0,4250268.0,-1.49,-3.62,5.10,-8.60,7.11,5.44,0.18,0.00,0.00\",\"2025-05-09,-725141.0,842237.0,-117096.0,-81036.0,-644105.0,-2.27,2.64,-0.37,-0.25,-2.02,5.37,-1.29,0.00,0.00\",\"2025-05-12,-5927261.0,3806524.0,2120737.0,-3167829.0,-2759432.0,-18.24,11.71,6.53,-9.75,-8.49,5.38,0.19,0.00,0.00\",\"2025-05-13,-3145102.0,728426.0,2416676.0,-3195822.0,50720.0,-7.89,1.83,6.06,-8.02,0.13,5.34,-0.74,0.00,0.00\",\"2025-05-14,-3434810.0,4471261.0,-1036451.0,-2820895.0,-613915.0,-8.76,11.40,-2.64,-7.19,-1.57,5.39,0.94,0.00,0.00\",\"2025-05-15,-5230981.0,5861252.0,-630271.0,-5298402.0,67421.0,-15.07,16.88,-1.82,-15.26,0.19,5.33,-1.11,0.00,0.00\",\"2025-05-16,-1745248.0,-693734.0,2438982.0,1067618.0,-2812866.0,-4.62,-1.84,6.46,2.83,-7.45,5.30,-0.56,0.00,0.00\",\"2025-05-19,-4074900.0,4041997.0,32903.0,65086.0,-4139986.0,-12.78,12.68,0.10,0.20,-12.99,5.35,0.94,0.00,0.00\",\"2025-05-20,549399.0,-275461.0,-273939.0,-2746978.0,3296377.0,1.59,-0.80,-0.79,-7.96,9.55,5.31,-0.75,0.00,0.00\",\"2025-05-21,-700111.0,1181532.0,-481421.0,-619724.0,-80387.0,-2.42,4.09,-1.67,-2.14,-0.28,5.30,-0.19,0.00,0.00\",\"2025-05-22,3371663.0,-2033134.0,-1338527.0,1016657.0,2355006.0,11.29,-6.81,-4.48,3.40,7.89,5.25,-0.94,0.00,0.00\",\"2025-05-23,1480133.0,-4839221.0,3359088.0,3285365.0,-1805232.0,3.54,-11.58,8.04,7.86,-4.32,5.18,-1.33,0.00,0.00\",\"2025-05-26,1043231.0,692586.0,-1735817.0,1043231.0,0.0,3.97,2.63,-6.60,3.97,0.00,5.18,0.00,0.00,0.00\",\"2025-05-27,-3931160.0,4688188.0,-757028.0,-3931160.0,0.0,-14.00,16.70,-2.70,-14.00,0.00,5.20,0.39,0.00,0.00\",\"2025-05-28,-4066197.0,1326312.0,2739885.0,-2765186.0,-1301011.0,-16.32,5.32,11.00,-11.10,-5.22,5.19,-0.19,0.00,0.00\",\"2025-05-29,-1298026.0,1021333.0,276694.0,4216178.0,-5514204.0,-2.82,2.22,0.60,9.17,-11.99,5.22,0.58,0.00,0.00\",\"2025-05-30,2748483.0,-2644401.0,-104081.0,-1035067.0,3783550.0,7.35,-7.08,-0.28,-2.77,10.12,5.22,0.00,0.00,0.00\",\"2025-06-03,-3094861.0,1231830.0,1863031.0,-3094861.0,0.0,-14.36,5.72,8.65,-14.36,0.00,5.20,-0.38,0.00,0.00\",\"2025-06-04,2447374.0,-1042824.0,-1404550.0,879232.0,1568142.0,9.67,-4.12,-5.55,3.47,6.20,5.20,0.00,0.00,0.00\",\"2025-06-05,4246105.0,-2126492.0,-2119612.0,1297058.0,2949047.0,16.71,-8.37,-8.34,5.10,11.60,5.20,0.00,0.00,0.00\",\"2025-06-06,632528.0,1253609.0,-1886137.0,-872027.0,1504555.0,2.54,5.03,-7.56,-3.50,6.03,5.21,0.19,0.00,0.00\",\"2025-06-09,1811110.0,501185.0,-2312295.0,-1753572.0,3564682.0,6.63,1.84,-8.47,-6.42,13.06,5.21,0.00,0.00,0.00\",\"2025-06-10,-843934.0,-839025.0,1682960.0,-696071.0,-147863.0,-1.68,-1.67,3.36,-1.39,-0.30,5.19,-0.38,0.00,0.00\",\"2025-06-11,-5922227.0,2872946.0,3049282.0,-1613271.0,-4308956.0,-19.84,9.63,10.22,-5.40,-14.44,5.19,0.00,0.00,0.00\",\"2025-06-12,1020878.0,-2293495.0,1272618.0,-388082.0,1408960.0,3.57,-8.02,4.45,-1.36,4.93,5.19,0.00,0.00,0.00\",\"2025-06-13,955426.0,1032351.0,-1987776.0,-2863597.0,3819023.0,2.85,3.08,-5.92,-8.53,11.38,5.14,-0.96,0.00,0.00\",\"2025-06-16,-4196496.0,2503803.0,1692693.0,-103509.0,-4092987.0,-14.67,8.76,5.92,-0.36,-14.31,5.12,-0.39,0.00,0.00\",\"2025-06-17,-7088086.0,4167103.0,2920983.0,-779412.0,-6308674.0,-16.69,9.81,6.88,-1.84,-14.86,5.19,1.37,0.00,0.00\",\"2025-06-18,2485954.0,-2815196.0,329242.0,1658966.0,826988.0,9.58,-10.85,1.27,6.39,3.19,5.15,-0.77,0.00,0.00\",\"2025-06-19,2169715.0,318564.0,-2488279.0,1151715.0,1018000.0,6.19,0.91,-7.10,3.29,2.90,5.06,-1.75,0.00,0.00\",\"2025-06-20,-3073337.0,2981840.0,91497.0,-3073337.0,0.0,-14.77,14.33,0.44,-14.77,0.00,5.06,0.00,0.00,0.00\",\"2025-06-23,-4849493.0,3485706.0,1363787.0,-6048024.0,1198531.0,-19.54,14.05,5.50,-24.37,4.83,5.09,0.59,0.00,0.00\",\"2025-06-24,-5356581.0,3475124.0,1881457.0,-4340841.0,-1015740.0,-23.88,15.49,8.39,-19.35,-4.53,5.14,0.98,0.00,0.00\",\"2025-06-25,-7526834.0,5907475.0,1619358.0,-2878381.0,-4648453.0,-18.65,14.64,4.01,-7.13,-11.52,5.19,0.97,0.00,0.00\",\"2025-06-26,-5056684.0,4712292.0,344392.0,-5056684.0,0.0,-17.90,16.68,1.22,-17.90,0.00,5.15,-0.77,0.00,0.00\",\"2025-06-27,1730965.0,-1141456.0,-589509.0,722595.0,1008370.0,7.26,-4.79,-2.47,3.03,4.23,5.16,0.19,0.00,0.00\"]}});";
        List<Object> lst = MaiDian.getData(content);

        List<Integer> rs = MaiDian.get_low(lst);
        //List<Integer> rs = get_low_1(lst);
        //System.out.println(rs);
        for (Integer i : rs) {
            System.out.println(lst.get(i));
        }

        List<Float> lsrs = getK(lst, rs);
        Float k = lsrs.get(0);
        List<Object> row = (List<Object>)lst.get(rs.get(0));
        Float old_price = (Float)row.get(2);
        Float yc = old_price + k * rs.get(0);
        System.out.println(yc);
        //Float yc =
//        for (Float i : lsrs) {
//            System.out.println(i);
//        }

        System.out.println("***************");
        // 获取 预测的价格
        Float price_x = get_price_x(lst, rs, lsrs);
        System.out.println(price_x);

        //int index = my_min(lst, 0, 30);
        //System.out.println(index);
        //System.out.println(lst.get(index));
        //System.out.println(lst);
    }

    @Test
    public void getlst_2() {
        String content = "jQuery112308788068735906851_1744518781844({\"rc\":0,\"rt\":22,\"svr\":177617941,\"lt\":1,\"full\":0,\"dlmkts\":\"\",\"data\":{\"code\":\"000629\",\"market\":0,\"name\":\"钒钛股份\",\"klines\":[\"2024-12-26,-12713613.0,13498658.0,-785044.0,294544.0,-13008157.0,-7.81,8.29,-0.48,0.18,-7.99,2.99,0.00,0.00,0.00\",\"2024-12-27,-955261.0,-2541386.0,3496646.0,-3452074.0,2496813.0,-0.40,-1.06,1.46,-1.44,1.04,3.01,0.67,0.00,0.00\",\"2024-12-30,-33740980.0,20997547.0,12743435.0,-20589962.0,-13151018.0,-13.52,8.41,5.11,-8.25,-5.27,2.96,-1.66,0.00,0.00\",\"2024-12-31,-17932947.0,26793660.0,-8860712.0,-3981631.0,-13951316.0,-7.03,10.51,-3.47,-1.56,-5.47,2.88,-2.70,0.00,0.00\",\"2025-01-02,-15460606.0,21480393.0,-6019787.0,-7972184.0,-7488422.0,-6.16,8.55,-2.40,-3.17,-2.98,2.80,-2.78,0.00,0.00\",\"2025-01-03,-19812263.0,23763845.0,-3951582.0,-7299401.0,-12512862.0,-8.37,10.03,-1.67,-3.08,-5.28,2.73,-2.50,0.00,0.00\",\"2025-01-06,-12550837.0,11135582.0,1415256.0,-5894371.0,-6656466.0,-5.84,5.19,0.66,-2.74,-3.10,2.75,0.73,0.00,0.00\",\"2025-01-07,7417012.0,-1533924.0,-5883088.0,6295790.0,1121222.0,4.69,-0.97,-3.72,3.98,0.71,2.78,1.09,0.00,0.00\",\"2025-01-08,-7703284.0,8462283.0,-758999.0,-13089731.0,5386447.0,-3.87,4.26,-0.38,-6.58,2.71,2.73,-1.80,0.00,0.00\",\"2025-01-09,1475288.0,4473226.0,-5948513.0,-2264802.0,3740090.0,1.23,3.74,-4.97,-1.89,3.12,2.72,-0.37,0.00,0.00\",\"2025-01-10,-6110634.0,10164728.0,-4054093.0,-10833739.0,4723105.0,-3.96,6.59,-2.63,-7.03,3.06,2.66,-2.21,0.00,0.00\",\"2025-01-13,1365481.0,11603751.0,-12969232.0,521808.0,843673.0,0.81,6.85,-7.65,0.31,0.50,2.70,1.50,0.00,0.00\",\"2025-01-14,18514089.0,-1037236.0,-17476853.0,8614855.0,9899234.0,8.25,-0.46,-7.79,3.84,4.41,2.77,2.59,0.00,0.00\",\"2025-01-15,-8977808.0,2734257.0,6243551.0,-1996478.0,-6981330.0,-5.28,1.61,3.67,-1.17,-4.11,2.74,-1.08,0.00,0.00\",\"2025-01-16,-4701927.0,7429816.0,-2727888.0,1470675.0,-6172602.0,-2.04,3.23,-1.18,0.64,-2.68,2.78,1.46,0.00,0.00\",\"2025-01-17,7222181.0,124930.0,-7347111.0,-26419.0,7248600.0,5.07,0.09,-5.16,-0.02,5.09,2.78,0.00,0.00,0.00\",\"2025-01-20,-2866465.0,10555103.0,-7688638.0,-7664524.0,4798059.0,-1.57,5.79,-4.22,-4.21,2.63,2.79,0.36,0.00,0.00\",\"2025-01-21,4433919.0,-6547187.0,2113270.0,-7725119.0,12159038.0,2.68,-3.96,1.28,-4.68,7.36,2.75,-1.43,0.00,0.00\",\"2025-01-22,1716038.0,-1380178.0,-335859.0,562829.0,1153209.0,1.55,-1.24,-0.30,0.51,1.04,2.74,-0.36,0.00,0.00\",\"2025-01-23,2754495.0,-3094666.0,340172.0,-2638480.0,5392975.0,1.61,-1.81,0.20,-1.55,3.16,2.73,-0.36,0.00,0.00\",\"2025-01-24,-8873043.0,9805821.0,-932778.0,-2675490.0,-6197553.0,-5.40,5.97,-0.57,-1.63,-3.77,2.75,0.73,0.00,0.00\",\"2025-01-27,-3655367.0,-2222325.0,5877692.0,3911900.0,-7567267.0,-2.08,-1.26,3.34,2.23,-4.31,2.74,-0.36,0.00,0.00\",\"2025-02-05,14335420.0,-6103653.0,-8231767.0,339930.0,13995490.0,9.88,-4.21,-5.67,0.23,9.65,2.77,1.09,0.00,0.00\",\"2025-02-06,15607119.0,-5445874.0,-10161244.0,-2450944.0,18058063.0,6.48,-2.26,-4.22,-1.02,7.50,2.82,1.81,0.00,0.00\",\"2025-02-07,995472.0,12408204.0,-13403675.0,-946492.0,1941964.0,0.36,4.50,-4.86,-0.34,0.70,2.85,1.06,0.00,0.00\",\"2025-02-10,-6740558.0,3383694.0,3356863.0,-7129093.0,388535.0,-2.69,1.35,1.34,-2.84,0.15,2.85,0.00,0.00,0.00\",\"2025-02-11,-7739974.0,4121330.0,3618644.0,7441690.0,-15181664.0,-3.48,1.85,1.63,3.34,-6.82,2.80,-1.75,0.00,0.00\",\"2025-02-12,-20574363.0,19315341.0,1259024.0,-3279034.0,-17295329.0,-9.18,8.61,0.56,-1.46,-7.71,2.83,1.07,0.00,0.00\",\"2025-02-13,-4602942.0,8238156.0,-3635213.0,-3615355.0,-987587.0,-1.91,3.42,-1.51,-1.50,-0.41,2.80,-1.06,0.00,0.00\",\"2025-02-14,-10066086.0,10047039.0,19047.0,-1608306.0,-8457780.0,-5.63,5.61,0.01,-0.90,-4.73,2.80,0.00,0.00,0.00\",\"2025-02-17,10329620.0,-4473410.0,-5856210.0,-2683138.0,13012758.0,5.05,-2.19,-2.86,-1.31,6.37,2.81,0.36,0.00,0.00\",\"2025-02-18,29519420.0,-28454585.0,-1064837.0,18745167.0,10774253.0,4.95,-4.77,-0.18,3.14,1.81,2.86,1.78,0.00,0.00\",\"2025-02-19,43007866.0,-29408126.0,-13599740.0,-3178559.0,46186425.0,10.19,-6.97,-3.22,-0.75,10.94,2.89,1.05,0.00,0.00\",\"2025-02-20,28342899.0,-12620888.0,-15722010.0,16441770.0,11901129.0,5.34,-2.38,-2.96,3.10,2.24,2.96,2.42,0.00,0.00\",\"2025-02-21,-31650212.0,23462619.0,8187595.0,-1996686.0,-29653526.0,-8.45,6.26,2.18,-0.53,-7.91,2.91,-1.69,0.00,0.00\",\"2025-02-24,-22276463.0,14607540.0,7668924.0,9159069.0,-31435532.0,-7.62,5.00,2.62,3.13,-10.75,2.88,-1.03,0.00,0.00\",\"2025-02-25,10084461.0,-5724655.0,-4359804.0,-8222403.0,18306864.0,3.22,-1.83,-1.39,-2.63,5.85,2.89,0.35,0.00,0.00\",\"2025-02-26,4473659.0,-8495355.0,4021697.0,-5341087.0,9814746.0,1.07,-2.04,0.96,-1.28,2.35,2.96,2.42,0.00,0.00\",\"2025-02-27,6449284.0,13096351.0,-19545636.0,-9676212.0,16125496.0,2.02,4.10,-6.12,-3.03,5.05,2.92,-1.35,0.00,0.00\",\"2025-02-28,-29797712.0,25737204.0,4060507.0,-13108533.0,-16689179.0,-11.56,9.99,1.58,-5.09,-6.48,2.85,-2.40,0.00,0.00\",\"2025-03-03,26430166.0,-13750987.0,-12679180.0,-3559611.0,29989777.0,6.89,-3.59,-3.31,-0.93,7.82,2.91,2.11,0.00,0.00\",\"2025-03-04,19653330.0,-6393559.0,-13259771.0,2781507.0,16871823.0,8.54,-2.78,-5.76,1.21,7.34,2.93,0.69,0.00,0.00\",\"2025-03-05,10332184.0,-4599517.0,-5732666.0,-12475939.0,22808123.0,4.37,-1.94,-2.42,-5.27,9.64,2.92,-0.34,0.00,0.00\",\"2025-03-06,14266888.0,-10334291.0,-3932597.0,-19587392.0,33854280.0,4.53,-3.28,-1.25,-6.22,10.75,2.94,0.68,0.00,0.00\",\"2025-03-07,-10797710.0,9873414.0,924297.0,20635872.0,-31433582.0,-2.55,2.33,0.22,4.86,-7.41,2.96,0.68,0.00,0.00\",\"2025-03-10,-4038816.0,5633768.0,-1594953.0,-1257328.0,-2781488.0,-1.64,2.29,-0.65,-0.51,-1.13,2.95,-0.34,0.00,0.00\",\"2025-03-11,44522921.0,-27355767.0,-17167154.0,-9350375.0,53873296.0,10.85,-6.67,-4.18,-2.28,13.13,3.02,2.37,0.00,0.00\",\"2025-03-12,-40475475.0,39881977.0,593498.0,5584323.0,-46059798.0,-10.67,10.51,0.16,1.47,-12.14,3.02,0.00,0.00,0.00\",\"2025-03-13,-30686159.0,28680773.0,2005386.0,-16681453.0,-14004706.0,-9.77,9.13,0.64,-5.31,-4.46,3.00,-0.66,0.00,0.00\",\"2025-03-14,2842158.0,15386807.0,-18228965.0,-6060785.0,8902943.0,0.75,4.04,-4.78,-1.59,2.34,3.04,1.33,0.00,0.00\",\"2025-03-17,-11633042.0,16677040.0,-5043997.0,9103585.0,-20736627.0,-3.73,5.35,-1.62,2.92,-6.65,3.01,-0.99,0.00,0.00\",\"2025-03-18,-4736390.0,6546150.0,-1809761.0,-13769197.0,9032807.0,-1.96,2.71,-0.75,-5.69,3.73,2.99,-0.66,0.00,0.00\",\"2025-03-19,-15304041.0,9023998.0,6280045.0,1254800.0,-16558841.0,-6.90,4.07,2.83,0.57,-7.46,2.98,-0.33,0.00,0.00\",\"2025-03-20,-16154867.0,9670950.0,6483917.0,-19574696.0,3419829.0,-6.90,4.13,2.77,-8.36,1.46,2.97,-0.34,0.00,0.00\",\"2025-03-21,-70058284.0,47527074.0,22531208.0,-11251129.0,-58807155.0,-23.02,15.62,7.40,-3.70,-19.32,2.92,-1.68,0.00,0.00\",\"2025-03-24,19852933.0,-2936585.0,-16916349.0,1773138.0,18079795.0,6.86,-1.02,-5.85,0.61,6.25,2.93,0.34,0.00,0.00\",\"2025-03-25,16861339.0,-6106835.0,-10754505.0,4872920.0,11988419.0,4.46,-1.61,-2.84,1.29,3.17,2.98,1.71,0.00,0.00\",\"2025-03-26,-27418876.0,26156434.0,1262443.0,-6464807.0,-20954069.0,-7.28,6.95,0.34,-1.72,-5.57,2.97,-0.34,0.00,0.00\",\"2025-03-27,-22566782.0,34478498.0,-11911716.0,-7792599.0,-14774183.0,-8.86,13.54,-4.68,-3.06,-5.80,2.94,-1.01,0.00,0.00\",\"2025-03-28,-29408998.0,31887701.0,-2478703.0,-271118.0,-29137880.0,-11.95,12.95,-1.01,-0.11,-11.84,2.89,-1.70,0.00,0.00\",\"2025-03-31,-20919264.0,19424004.0,1495262.0,-14007043.0,-6912221.0,-8.22,7.63,0.59,-5.51,-2.72,2.83,-2.08,0.00,0.00\",\"2025-04-01,4328070.0,-2304692.0,-2023379.0,-31330.0,4359400.0,2.58,-1.37,-1.20,-0.02,2.59,2.85,0.71,0.00,0.00\",\"2025-04-02,-6322921.0,12434778.0,-6111856.0,-1737121.0,-4585800.0,-5.80,11.40,-5.60,-1.59,-4.20,2.86,0.35,0.00,0.00\",\"2025-04-03,-3438238.0,5827723.0,-2389484.0,-3494239.0,56001.0,-2.55,4.33,-1.77,-2.60,0.04,2.85,-0.35,0.00,0.00\",\"2025-04-07,-35943776.0,32216249.0,3727527.0,-10917932.0,-25025844.0,-11.31,10.13,1.17,-3.43,-7.87,2.57,-9.82,0.00,0.00\",\"2025-04-08,-29271649.0,14280539.0,14991109.0,-11909843.0,-17361806.0,-10.57,5.16,5.41,-4.30,-6.27,2.56,-0.39,0.00,0.00\",\"2025-04-09,-18037549.0,22371168.0,-4333618.0,-11203349.0,-6834200.0,-7.34,9.10,-1.76,-4.56,-2.78,2.62,2.34,0.00,0.00\",\"2025-04-10,-4487313.0,1948476.0,2538838.0,8388738.0,-12876051.0,-2.19,0.95,1.24,4.09,-6.27,2.64,0.76,0.00,0.00\",\"2025-04-11,-4630418.0,3910333.0,720085.0,-2732569.0,-1897849.0,-3.21,2.71,0.50,-1.90,-1.32,2.64,0.00,0.00,0.00\",\"2025-04-14,14314721.0,-8921665.0,-5393056.0,4853915.0,9460806.0,7.44,-4.64,-2.80,2.52,4.92,2.69,1.89,0.00,0.00\",\"2025-04-15,-902235.0,-1348080.0,2250316.0,-12340468.0,11438233.0,-0.49,-0.73,1.22,-6.71,6.22,2.69,0.00,0.00,0.00\",\"2025-04-16,-12543767.0,8057729.0,4486038.0,-758921.0,-11784846.0,-8.57,5.50,3.06,-0.52,-8.05,2.66,-1.12,0.00,0.00\",\"2025-04-17,1122699.0,-383041.0,-739657.0,-4747892.0,5870591.0,1.03,-0.35,-0.68,-4.34,5.36,2.65,-0.38,0.00,0.00\",\"2025-04-18,2355349.0,-1783281.0,-572067.0,-2436295.0,4791644.0,2.14,-1.62,-0.52,-2.21,4.35,2.65,0.00,0.00,0.00\",\"2025-04-21,7131207.0,-4193419.0,-2937788.0,-4565835.0,11697042.0,5.97,-3.51,-2.46,-3.82,9.79,2.68,1.13,0.00,0.00\",\"2025-04-22,-9111860.0,5319808.0,3792052.0,-1670934.0,-7440926.0,-7.66,4.47,3.19,-1.40,-6.26,2.69,0.37,0.00,0.00\",\"2025-04-23,13550948.0,-9042436.0,-4508513.0,5752684.0,7798264.0,10.85,-7.24,-3.61,4.61,6.25,2.69,0.00,0.00,0.00\",\"2025-04-24,187189.0,228669.0,-415857.0,856603.0,-669414.0,0.15,0.18,-0.33,0.68,-0.53,2.68,-0.37,0.00,0.00\",\"2025-04-25,-3388555.0,10022485.0,-6633932.0,-1907842.0,-1480713.0,-1.79,5.30,-3.51,-1.01,-0.78,2.71,1.12,0.00,0.00\",\"2025-04-28,-26012632.0,13525773.0,12486859.0,-17049401.0,-8963231.0,-7.76,4.04,3.73,-5.09,-2.68,2.56,-5.54,0.00,0.00\",\"2025-04-29,8545978.0,1182442.0,-9728419.0,-3036638.0,11582616.0,6.65,0.92,-7.57,-2.36,9.01,2.57,0.39,0.00,0.00\",\"2025-04-30,-7386623.0,-5170002.0,12556623.0,-1144388.0,-6242235.0,-4.94,-3.46,8.40,-0.77,-4.18,2.55,-0.78,0.00,0.00\",\"2025-05-06,3327540.0,-1533729.0,-1793811.0,-2741200.0,6068740.0,1.52,-0.70,-0.82,-1.25,2.77,2.63,3.14,0.00,0.00\",\"2025-05-07,6685998.0,-2358964.0,-4327035.0,3094036.0,3591962.0,4.63,-1.63,-2.99,2.14,2.49,2.65,0.76,0.00,0.00\",\"2025-05-08,2216993.0,1841862.0,-4058857.0,-2253800.0,4470793.0,1.48,1.23,-2.71,-1.51,2.99,2.66,0.38,0.00,0.00\",\"2025-05-09,200714.0,2414017.0,-2614731.0,-1540156.0,1740870.0,0.16,1.96,-2.12,-1.25,1.41,2.63,-1.13,0.00,0.00\",\"2025-05-12,-5728315.0,-1608280.0,7336594.0,6758816.0,-12487131.0,-4.10,-1.15,5.25,4.84,-8.94,2.65,0.76,0.00,0.00\",\"2025-05-13,-18318233.0,7843266.0,10474969.0,-8464230.0,-9854003.0,-12.74,5.45,7.28,-5.88,-6.85,2.63,-0.75,0.00,0.00\",\"2025-05-14,21009541.0,-8860616.0,-12148925.0,1675954.0,19333587.0,10.29,-4.34,-5.95,0.82,9.47,2.67,1.52,0.00,0.00\",\"2025-05-15,-4115197.0,5817952.0,-1702754.0,9479520.0,-13594717.0,-2.47,3.49,-1.02,5.69,-8.17,2.63,-1.50,0.00,0.00\",\"2025-05-16,-5481162.0,1863269.0,3617894.0,3370608.0,-8851770.0,-3.87,1.32,2.56,2.38,-6.25,2.61,-0.76,0.00,0.00\",\"2025-05-19,-4571025.0,5283987.0,-712961.0,5622125.0,-10193150.0,-3.29,3.81,-0.51,4.05,-7.34,2.63,0.77,0.00,0.00\",\"2025-05-20,8771842.0,-3688447.0,-5083395.0,-1559702.0,10331544.0,6.64,-2.79,-3.85,-1.18,7.82,2.62,-0.38,0.00,0.00\",\"2025-05-21,9061820.0,-5961386.0,-3100434.0,-769481.0,9831301.0,8.11,-5.33,-2.77,-0.69,8.80,2.62,0.00,0.00,0.00\",\"2025-05-22,-15873600.0,14106185.0,1767416.0,-5324020.0,-10549580.0,-11.00,9.78,1.23,-3.69,-7.31,2.57,-1.91,0.00,0.00\",\"2025-05-23,-2246960.0,-1645413.0,3892372.0,1557020.0,-3803980.0,-1.87,-1.37,3.25,1.30,-3.17,2.55,-0.78,0.00,0.00\",\"2025-05-26,892477.0,-3607665.0,2715188.0,401279.0,491198.0,0.92,-3.73,2.81,0.42,0.51,2.57,0.78,0.00,0.00\",\"2025-05-27,-2862613.0,-91664.0,2954278.0,-1097986.0,-1764627.0,-3.13,-0.10,3.23,-1.20,-1.93,2.56,-0.39,0.00,0.00\",\"2025-05-28,-15663749.0,9493912.0,6169837.0,-4098884.0,-11564865.0,-16.16,9.80,6.37,-4.23,-11.93,2.53,-1.17,0.00,0.00\",\"2025-05-29,138477.0,7352658.0,-7491135.0,-1213295.0,1351772.0,0.13,7.07,-7.20,-1.17,1.30,2.56,1.19,0.00,0.00\",\"2025-05-30,-8729830.0,1786856.0,6942973.0,754827.0,-9484657.0,-3.58,0.73,2.85,0.31,-3.89,2.50,-2.34,0.00,0.00\",\"2025-06-03,1110667.0,5796400.0,-6907066.0,-798920.0,1909587.0,0.77,4.03,-4.80,-0.55,1.33,2.50,0.00,0.00,0.00\",\"2025-06-04,13059869.0,-11485001.0,-1574869.0,-763719.0,13823588.0,8.83,-7.76,-1.06,-0.52,9.34,2.54,1.60,0.00,0.00\",\"2025-06-05,-6188868.0,4991909.0,1196959.0,-4255527.0,-1933341.0,-6.64,5.36,1.28,-4.57,-2.07,2.53,-0.39,0.00,0.00\",\"2025-06-06,-5430196.0,6078250.0,-648055.0,1157108.0,-6587304.0,-4.12,4.61,-0.49,0.88,-5.00,2.55,0.79,0.00,0.00\",\"2025-06-09,8977716.0,2280666.0,-11258381.0,6060228.0,2917488.0,7.11,1.81,-8.92,4.80,2.31,2.57,0.78,0.00,0.00\",\"2025-06-10,562319.0,-3106685.0,2544368.0,-8776456.0,9338775.0,0.36,-1.99,1.63,-5.63,5.99,2.56,-0.39,0.00,0.00\",\"2025-06-11,1812029.0,-3173310.0,1361281.0,2269002.0,-456973.0,1.04,-1.82,0.78,1.30,-0.26,2.58,0.78,0.00,0.00\",\"2025-06-12,5640023.0,6410673.0,-12050697.0,11301321.0,-5661298.0,3.51,3.99,-7.49,7.03,-3.52,2.54,-1.55,0.00,0.00\",\"2025-06-13,9356654.0,1306822.0,-10663475.0,-5968471.0,15325125.0,5.69,0.80,-6.49,-3.63,9.33,2.53,-0.39,0.00,0.00\",\"2025-06-16,12280371.0,-1013821.0,-11266550.0,9379041.0,2901330.0,10.05,-0.83,-9.22,7.67,2.37,2.52,-0.40,0.00,0.00\",\"2025-06-17,-23323733.0,8230173.0,15093559.0,1425145.0,-24748878.0,-16.04,5.66,10.38,0.98,-17.02,2.54,0.79,0.00,0.00\",\"2025-06-18,-1287135.0,1744452.0,-457316.0,-1863623.0,576488.0,-1.27,1.72,-0.45,-1.83,0.57,2.52,-0.79,0.00,0.00\",\"2025-06-19,-2186945.0,4381557.0,-2194611.0,1000996.0,-3187941.0,-1.58,3.17,-1.59,0.72,-2.31,2.48,-1.59,0.00,0.00\",\"2025-06-20,-3741261.0,-1790222.0,5531483.0,-2415504.0,-1325757.0,-4.61,-2.21,6.81,-2.98,-1.63,2.48,0.00,0.00,0.00\",\"2025-06-23,2831303.0,496920.0,-3328223.0,666499.0,2164804.0,2.85,0.50,-3.35,0.67,2.18,2.51,1.21,0.00,0.00\",\"2025-06-24,9119577.0,-7196397.0,-1923180.0,-6486864.0,15606441.0,7.87,-6.21,-1.66,-5.60,13.47,2.54,1.20,0.00,0.00\",\"2025-06-25,7013448.0,-4386324.0,-2627124.0,3495053.0,3518395.0,5.13,-3.21,-1.92,2.56,2.58,2.55,0.39,0.00,0.00\",\"2025-06-26,13106652.0,-1051452.0,-12055201.0,-2299321.0,15405973.0,10.90,-0.87,-10.02,-1.91,12.81,2.54,-0.39,0.00,0.00\",\"2025-06-27,-3107225.0,2231542.0,875683.0,-594098.0,-2513127.0,-1.84,1.32,0.52,-0.35,-1.48,2.55,0.39,0.00,0.00\",\"2025-06-30,10147277.0,-5639423.0,-4507853.0,-1554096.0,11701373.0,8.58,-4.77,-3.81,-1.31,9.89,2.56,0.39,0.00,0.00\"]}});";
        List<Object> lst = MaiDian.getData(content);

        List<Integer> rs = MaiDian1.get_low_ex(lst);
        //List<Integer> rs = MaiDian1.get_height(lst);
        //List<Integer> rs = get_low_1(lst);
        //System.out.println(rs);
        for (Integer i : rs) {
            System.out.println(lst.get(i));
        }
        rs = MaiDian1.get_height_ex(lst);
        System.out.println("****************");
        for (Integer i : rs) {
            System.out.println(lst.get(i));
        }
    }

    public Float get_price_x(List<Object> lst, List<Integer> rs, List<Float> lsrs) {
        Float k = lsrs.get(0);
        Integer index = rs.get(0);
        List<Object> end_row = (List<Object>)lst.get(index);
        Float price = (Float)end_row.get(2);
        return price + k * index;
    }

    public List<Float> getK(List<Object> lst, List<Integer> rs) {
        List<Float> lsrs = new ArrayList<>();
        for (int i = 0; i < rs.size(); i += 2) {
            if (i + 1 < rs.size()) {
                int first = rs.get(i);
                int end = rs.get(i + 1);

                List<Object> row = (List<Object>) lst.get(first);
                List<Object> row_1 = (List<Object>) lst.get(end);
                Float h = (Float) row.get(2) - (Float) row_1.get(2);
                float myrs = h / (end - first);
                lsrs.add(myrs);
            }
        }
        return lsrs;
    }

    public List<Integer> get_low(List<Object> lst) {
        List<Integer> rs = new ArrayList<>();
        for (int i = 0; i < lst.size(); i++) {
            if ((i - 5) >= 0 && (i + 5) < lst.size()) {
                List<Object> row = (List<Object>)lst.get(i);

                List<Object> row_1 = (List<Object>)lst.get(i - 1);
                List<Object> row_2 = (List<Object>)lst.get(i + 1);
                List<Object> row_11 = (List<Object>)lst.get(i - 2);
                List<Object> row_21 = (List<Object>)lst.get(i + 2);
                float price = (float)row.get(2);
                float price_1 = (float)row_1.get(2);
                float price_2 = (float)row_2.get(2);
                float price_11 = (float)row_11.get(2);
                float price_21 = (float)row_21.get(2);
                float v1 = get_average_1(lst, i);
                float v2 = get_average_2(lst, i);

                float v13 = get_average_13(lst, i);
                float v23 = get_average_23(lst, i);
                if (((price < price_1 && price > price_2) || (price < price_11 && price > price_21)) && price < v1 && (price < v2 || price_2 < v2) && price < v13 && (price < v23 || price_2 < v23)) {
                    rs.add(i);
                }
            }
        }
        return rs;
    }

    public List<Integer> get_low_1(List<Object> lst) {
        List<Integer> rs = new ArrayList<>();
        for (int i = 0; i < lst.size(); i++) {
            if ((i - 5) >= 0 && (i + 5) < lst.size()) {
                List<Object> row = (List<Object>)lst.get(i);
                List<Object> row_1 = (List<Object>)lst.get(i - 1);
                List<Object> row_2 = (List<Object>)lst.get(i + 1);
                List<Object> row_11 = (List<Object>)lst.get(i - 2);
                List<Object> row_21 = (List<Object>)lst.get(i + 2);
                float price = (float)row.get(2);
                float price_1 = (float)row_1.get(2);
                float price_2 = (float)row_2.get(2);
                float price_11 = (float)row_11.get(2);
                float price_21 = (float)row_21.get(2);
                //float v1 = get_average_1(lst, i);
                //float v2 = get_average_2(lst, i);

                float v13 = get_average_13(lst, i);
                float v23 = get_average_23(lst, i);
                if (((price < price_1 && price > price_2) || (price < price_11 && price > price_21)) && price < v13 && (price < v23 || price_1 < v23)) {
                    rs.add(i);
                }
            }
        }
        return rs;
    }

    public Float get_average_1(List<Object> lst, int index) {
        List<Object> row_1 = (List<Object>)lst.get(index - 1);
        List<Object> row_2 = (List<Object>)lst.get(index - 2);
        List<Object> row_3 = (List<Object>)lst.get(index - 3);
        List<Object> row_4 = (List<Object>)lst.get(index - 4);
        List<Object> row_5 = (List<Object>)lst.get(index - 5);

        float price_1 = (float)row_1.get(2);
        float price_2 = (float)row_2.get(2);
        float price_3 = (float)row_3.get(2);
        float price_4 = (float)row_4.get(2);
        float price_5 = (float)row_5.get(2);

        return (Float) ((price_1 + price_2 + price_3 + price_4 + price_5) / 5);
    }

    public Float get_average_2(List<Object> lst, int index) {
        List<Object> row_1 = (List<Object>)lst.get(index + 1);
        List<Object> row_2 = (List<Object>)lst.get(index + 2);
        List<Object> row_3 = (List<Object>)lst.get(index + 3);
        List<Object> row_4 = (List<Object>)lst.get(index + 4);
        List<Object> row_5 = (List<Object>)lst.get(index + 5);

        float price_1 = (float)row_1.get(2);
        float price_2 = (float)row_2.get(2);
        float price_3 = (float)row_3.get(2);
        float price_4 = (float)row_4.get(2);
        float price_5 = (float)row_5.get(2);

        return (Float) ((price_1 + price_2 + price_3 + price_4 + price_5) / 5);
    }

    public Float get_average_13(List<Object> lst, int index) {
        List<Object> row_1 = (List<Object>)lst.get(index - 1);
        List<Object> row_2 = (List<Object>)lst.get(index - 2);
        List<Object> row_3 = (List<Object>)lst.get(index - 3);

        float price_1 = (float)row_1.get(2);
        float price_2 = (float)row_2.get(2);
        float price_3 = (float)row_3.get(2);

        return (Float) ((price_1 + price_2 + price_3) / 3);
    }

    public Float get_average_23(List<Object> lst, int index) {
        List<Object> row_1 = (List<Object>)lst.get(index + 1);
        List<Object> row_2 = (List<Object>)lst.get(index + 2);
        List<Object> row_3 = (List<Object>)lst.get(index + 3);

        float price_1 = (float)row_1.get(2);
        float price_2 = (float)row_2.get(2);
        float price_3 = (float)row_3.get(2);

        return (Float) ((price_1 + price_2 + price_3) / 3);
    }

    public int my_min(List<Object> lst, int begin, int end) {
        // 获取最小的 index 值
        float min = 50000f;
        int index = -1;
        for (int i = begin; i < end; i++) {
            List<Object> ls = (List<Object>)lst.get(i);
            if ((float)ls.get(2) < min) {
                min = (float)ls.get(2);
                index = i;
            }
        }
        return index;
    }
}
